package com.frxuexi.sign

import com.frxuexi.lib_base.BaseRepository
import com.frxuexi.lib_base.entity.ApiResponse
import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetWorkFactory
import kotlinx.coroutines.flow.Flow
import javax.annotation.Signed
import javax.inject.Inject

@OptIn
class SignRepository @Inject constructor():BaseRepository() {

    val apiService by lazy { NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getSigns(map: Map<String,Int>):Flow<ApiResponse<List<SignEntity>>>{
        return apiService.getSings(mapToBody(map))
    }

    fun sign(map: Map<String,Any>):Flow<ApiResponse<List<SignEntity>>>{
        return apiService.sign(mapToBody(map))
    }
}